import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import { resolve } from "path";
import requireTransform from "vite-plugin-require-transform";
// https://vitejs.dev/config/
export default defineConfig({
    resolve: {
        alias: [
            {
                find: "@",
                replacement: resolve(__dirname, "src")
            },
            {
                find: "@css",
                replacement: resolve(__dirname, "src/css")
            }
        ],
        extensions: [".vue", ".ts", ".js", ".json", ".mjs"]
    },
    server: {
        port: 3000,
        open: true
    },
    plugins: [
        uni(),
        requireTransform({
            fileRegex: /.js$|.vue$/
        })
    ],
    css: {
        preprocessorOptions: {
            scss: {
                api: "modern-compiler",
                silenceDeprecations: ["legacy-js-api", "import"]
            }
        }
    }
});
